package class2;

public class Worker extends Person{
    private int salary;
    public  Worker(){

    }
    public  Worker (String Name,int age,int salary){
        super(Name,age);
        setSalary(salary);
    }
    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
    public void work(){
        System.out.println("今天的天气真好啊");
    }
    @Override
    public void show(){
        super.show();
        System.out.println("我是"+getName()+"年龄"+getAge()+"薪水"+salary);
    }
    public static void main(String[] args) {

    }
}
